<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        .header {
            width: 100%;
            height: 40px;
            background-color: red;
            position: fixed;
        }
        .left {
            width: 100px;
            height: 100%;
            display: block;
            background-color: green;
            position: absolute;
            left: 0;
            top: 0;
        }
        .login {
            width: 100px;
            height: 100%;
            display: block;
            background-color: blue;
            position: absolute;
            top: 0;
            right: 0;
        }
        .search {
            margin: 0 100px;
            height: 100%;
            background-color: yellow;
        }
    </style>
</head>

<body>
    <div class="header">
        <a href="javascript:;" class="left"></a>
        <form action="" class="search">
            <input type="text">
        </form>
        <a href="javascript:;" class="login">登录</a>
    </div>
    <script>
    </script>
</body>

</html>